#pragma once

#include "DAEFloat3.h"
#include "DAEMatrix.h"

/**
* Defines an oriented bounding box.
* @author Koen Samyn.
*/
class OBB
{
public:
	/**
	* Creates a new Oriented bounding box from an axis aligned bounded box and a world matrix.
	* @param c1 the bottom corner of the axis aligned bounding box.
	* @param c2 the top corner of the axis algined bounding box.
	* @param world the world transform.
	*/
	OBB(DAEFloat3& c1, DAEFloat3& c2,DAEMatrix& world);
	/**
	* Destroys the oriented bounding box.
	*/
	virtual ~OBB(void);
	/**
	* Returns the first bottom vertex.
	* @return the first bottom vertex.
	*/
	DAEFloat3& GetB1(){
		return m_b1;
	}

	/**
	* Returns the second bottom vertex.
	* @return the second bottom vertex.
	*/
	DAEFloat3& GetB2(){
		return m_b2;
	}

	/**
	* Returns the third bottom vertex.
	* @return the third bottom vertex.
	*/
	DAEFloat3& GetB3(){
		return m_b3;
	}

	/**
	* Returns the first bottom vertex.
	* @return the first bottom vertex.
	*/
	DAEFloat3& GetB4(){
		return m_b4;
	}

	/**
	* Returns the first upper vertex.
	* @return the first upper vertex.
	*/
	DAEFloat3& GetU1(){
		return m_u1;
	}

	/**
	* Returns the second upper vertex.
	* @return the second upper vertex.
	*/
	DAEFloat3& GetU2(){
		return m_u2;
	}

	/**
	* Returns the third upper vertex.
	* @return the third upper vertex.
	*/
	DAEFloat3& GetU3(){
		return m_u3;
	}

	/**
	* Returns the first upper vertex.
	* @return the first upper vertex.
	*/
	DAEFloat3& GetU4(){
		return m_u4;
	}
private:
	DAEFloat3 m_b1,m_b2,m_b3,m_b4;
	DAEFloat3 m_u1,m_u2,m_u3,m_u4;
	// -------------------------
	// Disabling default copy constructor and default assignment operator.
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
	// an error in your class, these declarations are deliberately made without implementation because they should never be used.
	// -------------------------
	OBB(const OBB& t);
	OBB& operator=(const OBB& t);
};

